<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="tr09" uri="http://www.51i-star.com/news"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>品牌列表</title>
<script type="text/javascript" src="js/jquery-3.1.0.js"></script>
<script type="text/javascript">
	function removebrand(id, link) {
		var x = confirm("您确定要删除指定的品牌吗？");
		if (x == true) {
			$.get("DeleteBrand", {id : id}, function() {
				$(link).parent().parent().remove();
				document.location = "BrandSerclet?curpage=1&pagesize=5";
			});
		}
	}
</script>

<style type="text/css">
* {
	margin: 0px;
	padding: 0px;
}
body{
background: #e8e8e8;
}
.t1 {
	float: right;
	height: 26px;
	line-height: 26px;
	padding: 0 10px 0 23px;
	background: #56bbeb;
	border-radius: 3px;
	color: #fff;
	font-size: 13px;
	font-weight: normal;
	text-align: center;
	cursor: pointer;
	text-decoration: none;
}

.t2 {
	background: #f3f3f3 repeat-x;
	border: 1px solid #ddd;
	padding: 5px;
	color: #808080;
	margin: 0 0 10px 0;
}

.t3 {
	border-collapse: collapse;
	border: none;
	width: 100%;
}

.t3 td {
	text-align: center;
}

th, td {
	padding: 8px;
	border: none;
	border-bottom: 1px solid #CCC;
}

th {
	color: gray;
	border:1px #CCC solid;
	background: #f3f3f3;
}

td {
	border-bottom: 1px dashed #CCC;
	border-left: 1px dashed #CCC;
	font-size: 12px;
	background: white;
}

.t5 {
	background: #e8e8e8;
	border: 0px red solid;
	height: 70px;
}

.t6 {
	padding-top: 20px;
	font-size: 18px;
	border-bottom: 1px solid #ccc;
}

.t7 {
	float: right;
	height: 26px;
	line-height: 26px;
	padding: 0 10px 0 13px;
	background: #0099FF;
	border-radius: 3px;
	color: #fff;
	font-size: 13px;
	font-weight: normal;
	text-align: center;
	cursor: pointer;
	text-decoration: none;
	margin-right: 20px;
}

a {
	cursor: pointer;
	font-size: 12px;
	color: #335B64;;
	text-decoration: none;
}

input.button {
	padding: 5px 15px 5px;
	margin: 2px 2px;
	border: none;
	background: #0099FF;
	color: #FFF;
	cursor: pointer;
	border-radius: 3px;
}

img {
	vertical-align: middle;
}

.pager {
	text-align: right;
	padding: 10px;
	background: white;
}

.pager a {
	text-decoration: none;
	color: gray;
}

.pager span {
	font-size: 12px;
	color: gray;
}
p, td, div {
    font: 12px Microsoft Yahei, "sans-serif", "Arial", "Verdana";
}
</style>

</head>


<body>

	<div class="t5">
		<h1 class="t6">
			小熊猫 管理中心—品牌列表<a href="addbrand.jsp" class="t7">添加品牌</a>
		</h1>
	</div>
	<div class="t2">
		<form action="BrandText">
			<input type="hidden" name="curpage" value="1"> 
			<input  type="hidden" name="pagesize" value="5"> <img
				src="image/后台图片/icon_search.gif" border="0" alt="SEARCH"> <span
				style="font-size: 12px";color:gray;>关键字</span><input name="txt"><input
				type="submit" value=" 搜索 " class="button">
		</form>
	</div>
	<div>

		<table class="t3">
			<tr>
				<th>品牌名称</th>
				<th>品牌网址</th>
				<th>品牌描述</th>
				<th>操作</th>
			</tr>
			<c:forEach items="${list}" var="c">
				<tr>
					<td>${c.brandName}</td>
					<td><a href='${c.brandUrl}' target="_blank">${c.brandUrl}</a></td>
					<td>${c.brandDescribe}</td>
					<td><a title="编辑" href="Brandxg?id=${c.brandId}"><img
							src="image/商品列表/bj.png"></a> <a title="删除"
						onclick="removebrand('${c.brandId}',this)"><img
							src="image/商品列表/sc.png"></a></td>
				</tr>
			</c:forEach>
		</table>
		<div class="pager">
			<tr09:pager url="BrandSerclet" pagesize="5" total="${total}"
				curpage="${param.curpage}" />
		</div>
	</div>
</body>
</html>